package com.jrx.anytxn.param.mapper.ext;

import com.jrx.anytxn.param.entity.PrInvestorPenaltyRate;
import com.jrx.anytxn.param.mapper.base.PrInvestorPenaltyRateMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 罚息利率表 mapper接口扩展
 *
 * @author 黄秋平
 * @date 2020-5-18 16:26:42
 */
public interface ExtPrInvestorPenaltyRateMapper extends PrInvestorPenaltyRateMapper {

    /**
     * 根据字段查询
     * @param investorPenaltyId
     * @param organizationId
     * @param tenantId
     * @return
     */
    PrInvestorPenaltyRate selectByPenaltyId(@Param("investorPenaltyId") String investorPenaltyId, @Param("organizationId") String organizationId, @Param("tenantId") String tenantId);

    /**
     * 根据租户Id查询所有
     *
     * @param tenantId 租户Id
     * @return java.util.List<com.jrx.anytxn.param.entity.PrPenaltyRateTable>
     * @author
     */
    List<PrInvestorPenaltyRate> selectByTenId(String tenantId);

    /**
     * 根据租户ID和罚息利率ID更新
     *
     * @param prInvestorPenaltyRate
     * @return int
     * @author
     */
    int updateByTenIdAndPenaltyId(PrInvestorPenaltyRate prInvestorPenaltyRate);

    /**
     * 根据租户ID和罚息利率表ID
     *
     * @param tenantId  租户ID
     * @param investorPenaltyId 罚息利率表ID
     * @return
     */
    PrInvestorPenaltyRate selectByTenIdAndPanaltyId(@Param("tenantId") String tenantId, @Param("investorPenaltyId") String investorPenaltyId);

    /**
     * 根据租户ID和罚息利率表ID删除
     *
     * @param tenantId  租户Id
     * @param investorPenaltyId 罚息利率表ID
     * @return
     */
    int deleteByTenIdAndPenaltyId(@Param("tenantId") String tenantId, @Param("investorPenaltyId") String investorPenaltyId);
}